<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="g" uri="/gt-grid"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<g:head />
<script language="javascript" type="text/javascript">
	var data1 = [ {
		id : 1,
		name : 'aaa',
		age : 12,
		gender : 'M'
	}, {
		id : 2,
		name : 'bbb',
		age : 11,
		gender : 'F'
	}, {
		id : 3,
		name : 'ccc',
		age : 13,
		gender : 'F'
	}

	];

	var dsConfig = {
		fields : [ {
			name : 'id'
		}, {
			name : 'name'
		}, {
			name : 'age',
			type : 'int'
		}, {
			name : 'deleted',
			type : 'boolean'
		} ]
	};

	var colsConfig = [
			{
				id : 'id',
				header : "选择",
				width : 50,
				align : 'center',
				isCheckColumn : true
			}, {
				id : 'name',
				header : "姓名",
				fieldName : 'name',
				editable : false,
				editor : {
					type : 'text',
					validRule : 'R'
				}
			}, {
				id : 'age',
				header : "年龄",
				fieldName : 'age',
				editable : false,
				editor : {
					type : 'text',
					validRule : 'integer'
				}
			}, {
				id : 'deleted',
				header : "删除标志",
				fieldName : 'deleted'
			} ];
</script>
</head>
<body>
<g:gt-grid id="grid1" dataset="dsConfig" columns="colsConfig"
	loadURL="workbench/load" saveURL="workbench/save" remotePaging="true"
	width="700" height="300" pageSize="10"  selectRowByCheck="true" 
	toolbarContent="nav | goto | pagesize | reload | add del save | state" />
</body>
</html>
